package com.atguigu.gulimall.product.service;

import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.product.entity.CategoryEntity;
import com.atguigu.gulimall.product.vo.Catelog2Vo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author fangdada
 * @email 1819675707@qq.com
 * @date 2021-04-30 21:16:24
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

	List<CategoryEntity> listWithTree();

	void removeMenuByIds(List<Long> asList);

	/**
	 * 查找catelogId的完整路径
	 * [父/子/孙] 的完整路径
	 * @author fd
	 * @date 2021/5/12 18:40
	 * @param catelogId
	 * @return java.lang.Long[]
	 */
	Long[] findCatelogPath(Long catelogId);

	/**
	 * 级联更新所有关联的数据
	 * @author fd
	 * @date 2021/5/15 16:17
	 * @param category
	 */
	void updateCascade(CategoryEntity category);

	/**
	 * 查询所有一级分类
	 * @author fd
	 * @date 2021/7/6 16:02
	 * @return java.util.List<com.atguigu.gulimall.product.entity.CategoryEntity>
	 */
	List<CategoryEntity> getLevel1Categorys();

	/**
	 * @Author FangDaDa
	 * @Description 查询二级，三级分类返回json
	 * @Date 20:16 2021/7/6
	 * @Param []
	 * @return java.util.Map<java.lang.String,java.util.List<com.atguigu.gulimall.product.vo.Catelog2Vo>>
	 **/
	Map<String, List<Catelog2Vo>>getCatalogJson();
}

